From e7e3ef9d3eca085616ee86adcfe9080aa7e807a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Oct 2017 08:25:20 +0200 Subject: [PATCH] grid: Simplify allocating children allocation->x and allocation->y are always 0. MAX'ing width/height with 1 is also wrong now since 0 is a valid width/height for widgets. --- gtk/gtkgrid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c index 16b6a8948e..50d2865f62 100644 --- a/gtk/gtkgrid.c +++ b/gtk/gtkgrid.c @@ -1573,10 +1573,10 @@ gtk_grid_request_allocate_children (GtkGridRequest *request, allocate_child (request, GTK_ORIENTATION_HORIZONTAL, child, &x, &width, &ignore); allocate_child (request, GTK_ORIENTATION_VERTICAL, child, &y, &height, &baseline); - child_allocation.x = allocation->x + x; - child_allocation.y = allocation->y + y; - child_allocation.width = MAX (1, width); - child_allocation.height = MAX (1, height); + child_allocation.x = x; + child_allocation.y = y; + child_allocation.width = width; + child_allocation.height = height; if (_gtk_widget_get_direction (GTK_WIDGET (request->grid)) == GTK_TEXT_DIR_RTL) child_allocation.x = allocation->x + allocation->width -- 2.30.2